package com.fengke.dao.tag.impl;

import java.sql.SQLException;
import java.util.List;

import com.fengke.dao.BaseDaoIbatis;
import com.fengke.dao.model.TagModel;
import com.fengke.dao.tag.TagManager;

public class TagManagerImpl extends BaseDaoIbatis implements TagManager {
	@SuppressWarnings("unchecked")
	@Override
	public List<TagModel> researchTagModelList(TagModel tagModel) throws SQLException {
		return this.getSqlMapClientTemplate().queryForList("TagRepository.researchTagModelList", tagModel);
	}
	@Override
	public Long createTag(TagModel tagModel) throws SQLException {
		return (Long) this.getSqlMapClientTemplate().insert("TagRepository.createTag", tagModel);
	}
	@Override
	public int updateTagById(TagModel tagModel) throws SQLException {
		return this.getSqlMapClientTemplate().update("TagRepository.updateTagById", tagModel);
	}
	@Override
	public int deleteTagByIds(List<String> list) throws SQLException {
		return this.getSqlMapClientTemplate().delete("TagRepository.deleteTagByIds", list);
	}
}
